<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Verhoeff algorithm</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Verhoeff_algorithm"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Verhoeff_algorithm rootpage-Verhoeff_algorithm skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Verhoeff algorithm</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>The <b>Verhoeff algorithm</b><sup id="cite_ref-Verhoeff_1969_1-0" class="reference"><a href="#cite_note-Verhoeff_1969-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> is a <a href="Checksum" title="Checksum">checksum</a> for <a href="Error_detection" class="mw-redirect" title="Error detection">error detection</a> first published by Dutch mathematician <a href="Jacobus_Verhoeff" title="Jacobus Verhoeff">Jacobus Verhoeff</a> in 1969.<sup id="cite_ref-Kirtland_2001_2-0" class="reference"><a href="#cite_note-Kirtland_2001-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Salomon_2005_3-0" class="reference"><a href="#cite_note-Salomon_2005-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> It was the first decimal <a href="Check_digit" title="Check digit">check digit</a> algorithm which detects all single-digit errors, and all transposition errors involving two adjacent digits,<sup id="cite_ref-Haunsperger_2006_4-0" class="reference"><a href="#cite_note-Haunsperger_2006-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> which was at the time thought impossible with such a code.
</p><p>The method was independently discovered by H. Peter Gumm in 1985, this time including a <a href="Formal_proof" title="Formal proof">formal proof</a> and an extension to any base.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Goals">Goals</h2></div>
<p>Verhoeff had the goal of finding a decimal code—one where the check digit is a single decimal digit—which detected all single-digit errors and all transpositions of adjacent digits. At the time, supposed proofs of the nonexistence<sup id="cite_ref-Sisson_1958_6-0" class="reference"><a href="#cite_note-Sisson_1958-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> of these codes made base-11 codes popular, for example in the <a href="International_Standard_Book_Number" class="mw-redirect" title="International Standard Book Number">ISBN check digit</a>.
</p><p>His goals were also practical, and he based the evaluation of different codes on live data from the Dutch postal system, using a weighted points system for different kinds of error. The analysis broke the errors down into a number of categories: first, by how many digits are in error; for those with two digits in error, there are <i>transpositions</i> (<i>ab</i> → <i>ba</i>), <i>twins</i> (<i>aa</i> → 'bb'), <i>jump transpositions</i> (<i>abc</i> → <i>cba</i>), <i>phonetic</i> (<i>1a</i> → <i>a0</i>), and <i>jump twins</i> (<i>aba</i> → <i>cbc</i>). Additionally there are omitted and added digits. Although the frequencies of some of these kinds of errors might be small, some codes might be immune to them in addition to the primary goals of detecting all singles and transpositions.
</p><p>The phonetic errors in particular showed linguistic effects, because in Dutch, numbers are typically read in pairs; and also while 50 sounds similar to 15 in Dutch, 80 doesn't sound like 18.
</p><p>Taking six-digit numbers as an example, Verhoeff reported the following classification of the errors:.
</p>
<table class="wikitable">
<tbody><tr valign="middle">
<th style="background:#ffc">Digits in error
</th>
<th style="background:#ffc">Classification
</th>
<th style="background:#ffc">Count
</th>
<th style="background:#ffc">Frequency
</th></tr>
<tr>
<td style="background:#ffc">1</td>
<td style="background:#ffc">Transcription</td>
<td align="right">9,574</td>
<td align="right">79.05%
</td></tr>
<tr>
<td style="background:#ffc" rowspan="8">2</td>
<td style="background:#ffc">Transpositions</td>
<td align="right">1,237</td>
<td align="right">10.21%
</td></tr>
<tr>
<td style="background:#ffc">Twins</td>
<td align="right">67</td>
<td align="right">0.55%
</td></tr>
<tr>
<td style="background:#ffc">Phonetic</td>
<td align="right">59</td>
<td align="right">0.49%
</td></tr>
<tr>
<td style="background:#ffc">Other adjacent</td>
<td align="right">232</td>
<td align="right">1.92%
</td></tr>
<tr>
<td style="background:#ffc">Jump transpositions</td>
<td align="right">99</td>
<td align="right">0.82%
</td></tr>
<tr>
<td style="background:#ffc">Jump Twins</td>
<td align="right">35</td>
<td align="right">0.29%
</td></tr>
<tr>
<td style="background:#ffc">Other jump errors</td>
<td align="right">43</td>
<td align="right">0.36%
</td></tr>
<tr>
<td style="background:#ffc">Other</td>
<td align="right">98</td>
<td align="right">0.81%
</td></tr>
<tr>
<td colspan="2" style="background:#ffc">3</td>
<td align="right">169</td>
<td align="right">1.40%
</td></tr>
<tr>
<td colspan="2" style="background:#ffc">4</td>
<td align="right">118</td>
<td align="right">0.97%
</td></tr>
<tr>
<td colspan="2" style="background:#ffc">5</td>
<td align="right">219</td>
<td align="right">1.81%
</td></tr>
<tr>
<td colspan="2" style="background:#ffc">6</td>
<td align="right">162</td>
<td align="right">1.34%
</td></tr>
<tr>
<td colspan="2" style="background:#ffc"><b>Total</b></td>
<td align="right"><b>12,112</b>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Description">Description</h2></div>
<p>The general idea of the algorithm is to represent each of the digits (0 through 9) as elements of the <a href="Dihedral_group" title="Dihedral group">dihedral group</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle D_{5}}</annotation>
</semantics>
</math></span><img src="./0aae0fc530390b62f9fa9e136ba62961d06f99f4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.979ex; height:2.509ex;" alt="{\displaystyle D_{5}}" loading="lazy"></span>. That is, map digits to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle D_{5}}</annotation>
</semantics>
</math></span><img src="./0aae0fc530390b62f9fa9e136ba62961d06f99f4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.979ex; height:2.509ex;" alt="{\displaystyle D_{5}}" loading="lazy"></span>, manipulate these, then map back into digits. Let this mapping be <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m:[0,9]\to D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
<mo>:</mo>
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mn>9</mn>
<mo stretchy="false">]</mo>
<mo stretchy="false">→<!-- → --></mo>
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m:[0,9]\to D_{5}}</annotation>
</semantics>
</math></span><img src="./c56f228680e61808ba8749b442959230a547ed6a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.223ex; height:2.843ex;" alt="{\displaystyle m:[0,9]\to D_{5}}" loading="lazy"></span>
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m={\begin{pmatrix}0&1&2&3&4&5&6&7&8&9\\e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\end{pmatrix}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>(</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>2</mn>
</mtd>
<mtd>
<mn>3</mn>
</mtd>
<mtd>
<mn>4</mn>
</mtd>
<mtd>
<mn>5</mn>
</mtd>
<mtd>
<mn>6</mn>
</mtd>
<mtd>
<mn>7</mn>
</mtd>
<mtd>
<mn>8</mn>
</mtd>
<mtd>
<mn>9</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>e</mi>
</mtd>
<mtd>
<mi>r</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mtd>
<mtd>
<mi>s</mi>
</mtd>
<mtd>
<mi>r</mi>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m={\begin{pmatrix}0&1&2&3&4&5&6&7&8&9\\e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\end{pmatrix}}}</annotation>
</semantics>
</math></span><img src="./70174d129ee2ea4b632771864adb96b0dadc8330.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:51.73ex; height:6.176ex;" alt="{\displaystyle m={\begin{pmatrix}0&1&2&3&4&5&6&7&8&9\\e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\end{pmatrix}}}" loading="lazy"></span>
</p><p>Let the nth digit be <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a_{n}}</annotation>
</semantics>
</math></span><img src="./790f9209748c2dca7ed7b81932c37c02af1dbc31.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.448ex; height:2.009ex;" alt="{\displaystyle a_{n}}" loading="lazy"></span> and let the number of digits be <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span>.
</p><p>For example given the code 248 then <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> is 3 and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a_{3}=m(8)=r^{3}s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
<mo>=</mo>
<mi>m</mi>
<mo stretchy="false">(</mo>
<mn>8</mn>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a_{3}=m(8)=r^{3}s}</annotation>
</semantics>
</math></span><img src="./81fceca50586e66a4c6812cf13dcd43012b0cf98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.686ex; height:3.176ex;" alt="{\displaystyle a_{3}=m(8)=r^{3}s}" loading="lazy"></span>.
</p><p>Now define the permutation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f:D_{5}\to D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo>:</mo>
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
<mo stretchy="false">→<!-- → --></mo>
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f:D_{5}\to D_{5}}</annotation>
</semantics>
</math></span><img src="./b6f1a7f5e9d7d42eb48fe02e3d64c36b31c09383.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.787ex; height:2.509ex;" alt="{\displaystyle f:D_{5}\to D_{5}}" loading="lazy"></span>
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f={\begin{pmatrix}e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\\r&s&r^{2}s&rs&r^{2}&r^{3}s&r^{3}&e&r^{4}s&r^{4}\end{pmatrix}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>(</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mi>e</mi>
</mtd>
<mtd>
<mi>r</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mtd>
<mtd>
<mi>s</mi>
</mtd>
<mtd>
<mi>r</mi>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>r</mi>
</mtd>
<mtd>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<mi>r</mi>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mtd>
<mtd>
<mi>e</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mi>s</mi>
</mtd>
<mtd>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f={\begin{pmatrix}e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\\r&s&r^{2}s&rs&r^{2}&r^{3}s&r^{3}&e&r^{4}s&r^{4}\end{pmatrix}}}</annotation>
</semantics>
</math></span><img src="./7b3da25ac0a3987eb520206435fccdb1465e29ab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:53.975ex; height:6.176ex;" alt="{\displaystyle f={\begin{pmatrix}e&r&r^{2}&r^{3}&r^{4}&s&rs&r^{2}s&r^{3}s&r^{4}s\\r&s&r^{2}s&rs&r^{2}&r^{3}s&r^{3}&e&r^{4}s&r^{4}\end{pmatrix}}}" loading="lazy"></span>
</p><p>For example <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(r^{3})=rs}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>r</mi>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f(r^{3})=rs}</annotation>
</semantics>
</math></span><img src="./1f357176462f5c08e75b77bf8c99abcff292c8d0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.428ex; height:3.176ex;" alt="{\displaystyle f(r^{3})=rs}" loading="lazy"></span>. Another example is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f^{2}(r^{3})=r^{3}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f^{2}(r^{3})=r^{3}}</annotation>
</semantics>
</math></span><img src="./8fbc633e1d6e88b5ba0e12965c661063616ed095.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.488ex; height:3.176ex;" alt="{\displaystyle f^{2}(r^{3})=r^{3}}" loading="lazy"></span> since <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(f(r^{3}))=f(rs)=r^{3}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>f</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>r</mi>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f(f(r^{3}))=f(rs)=r^{3}}</annotation>
</semantics>
</math></span><img src="./339e7274ce3afab1f520ba9d53517d08e5d50d73.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.805ex; height:3.176ex;" alt="{\displaystyle f(f(r^{3}))=f(rs)=r^{3}}" loading="lazy"></span>
</p><p>Using multiplicative notation for the group operation of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle D_{5}}</annotation>
</semantics>
</math></span><img src="./0aae0fc530390b62f9fa9e136ba62961d06f99f4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.979ex; height:2.509ex;" alt="{\displaystyle D_{5}}" loading="lazy"></span>, the check digit is then simply a value <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> such that
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(a_{1})\cdot f^{2}(a_{2})\cdot \ldots \cdot f^{k}(a_{k})\cdot f^{k+1}(c)=e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo stretchy="false">(</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<mo>…<!-- … --></mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f(a_{1})\cdot f^{2}(a_{2})\cdot \ldots \cdot f^{k}(a_{k})\cdot f^{k+1}(c)=e}</annotation>
</semantics>
</math></span><img src="./45b6117516550517a8a8c02839d0d32b0163654a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:39.325ex; height:3.176ex;" alt="{\displaystyle f(a_{1})\cdot f^{2}(a_{2})\cdot \ldots \cdot f^{k}(a_{k})\cdot f^{k+1}(c)=e}" loading="lazy"></span>
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> is explicitly given by inverse permutation
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c=f^{-1-k}\left(\prod _{n=1}^{k}f^{n}(a_{n})^{-1}\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>=</mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mi>k</mi>
</mrow>
</msup>
<mrow>
<mo>(</mo>
<mrow>
<munderover>
<mo>∏<!-- ∏ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</munderover>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
</mrow>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c=f^{-1-k}\left(\prod _{n=1}^{k}f^{n}(a_{n})^{-1}\right)}</annotation>
</semantics>
</math></span><img src="./e3c7b29a4e914354465a4aa1b4a78af50676e63e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:26.565ex; height:7.509ex;" alt="{\displaystyle c=f^{-1-k}\left(\prod _{n=1}^{k}f^{n}(a_{n})^{-1}\right)}" loading="lazy"></span>
</p><p>For example the check digit for 248 is 5. To verify this, use the mapping to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D_{5}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>D</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle D_{5}}</annotation>
</semantics>
</math></span><img src="./0aae0fc530390b62f9fa9e136ba62961d06f99f4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.979ex; height:2.509ex;" alt="{\displaystyle D_{5}}" loading="lazy"></span> and insert into the LHS of the previous equation
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(r^{2})\cdot f^{2}(r^{4})\cdot f^{3}(r^{3}s)\cdot f^{4}(s)=e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f(r^{2})\cdot f^{2}(r^{4})\cdot f^{3}(r^{3}s)\cdot f^{4}(s)=e}</annotation>
</semantics>
</math></span><img src="./bda92595edb1f28556027abc5884ef15dc42b5cf.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.349ex; height:3.176ex;" alt="{\displaystyle f(r^{2})\cdot f^{2}(r^{4})\cdot f^{3}(r^{3}s)\cdot f^{4}(s)=e}" loading="lazy"></span>
</p><p>To evaluate this permutation quickly use that
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f^{4}(s)=f^{3}(r^{3}s)=f^{2}(r^{4})=f(r^{2})=r^{2}s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>f</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>f</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f^{4}(s)=f^{3}(r^{3}s)=f^{2}(r^{4})=f(r^{2})=r^{2}s}</annotation>
</semantics>
</math></span><img src="./8bd40b7f344109a2d96608514a4955fe04159cde.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:39.717ex; height:3.176ex;" alt="{\displaystyle f^{4}(s)=f^{3}(r^{3}s)=f^{2}(r^{4})=f(r^{2})=r^{2}s}" loading="lazy"></span>
</p><p>to get that
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r^{2}s\cdot r^{2}s\cdot r^{2}s\cdot r^{2}s=e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>=</mo>
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r^{2}s\cdot r^{2}s\cdot r^{2}s\cdot r^{2}s=e}</annotation>
</semantics>
</math></span><img src="./0f4f89b4c521936261fcc5abf186ecf2a91e3e64.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:21.993ex; height:2.676ex;" alt="{\displaystyle r^{2}s\cdot r^{2}s\cdot r^{2}s\cdot r^{2}s=e}" loading="lazy"></span>
</p><p>This is the same reflection being iteratively multiplied. Use that reflections are their own inverse.<sup id="cite_ref-Gallian_2010_7-0" class="reference"><a href="#cite_note-Gallian_2010-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (r^{2}s\cdot r^{2}s)\cdot (r^{2}s\cdot r^{2}s)=e^{2}=e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>=</mo>
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (r^{2}s\cdot r^{2}s)\cdot (r^{2}s\cdot r^{2}s)=e^{2}=e}</annotation>
</semantics>
</math></span><img src="./26e6d27a5c0bb6c608d2de5e0912c7e525b29fa4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:30.847ex; height:3.176ex;" alt="{\displaystyle (r^{2}s\cdot r^{2}s)\cdot (r^{2}s\cdot r^{2}s)=e^{2}=e}" loading="lazy"></span>
</p><p>In practice the algorithm is implemented using simple <a href="Lookup_table" title="Lookup table">lookup tables</a> without needing to understand how to generate those tables from the underlying group and permutation theory. This is more properly considered a family of algorithms, as other permutations work too. Verhoeff's notes that the particular permutation, given above, is special as it has the property of detecting 95.3% of the phonetic errors.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p><p>The strengths of the algorithm are that it detects all transliteration and transposition errors, and additionally most twin, twin jump, jump transposition and phonetic errors.
</p><p>The main weakness of the Verhoeff algorithm is its complexity. The calculations required cannot easily be expressed as a formula in say <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\displaystyle \mathbb {Z} /10\mathbb {Z} }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\displaystyle \mathbb {Z} /10\mathbb {Z} }}</annotation>
</semantics>
</math></span><img src="./a09bb18050e0edfb6dc153b110967d5a19b1daa9.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.588ex; height:2.843ex;" alt="{\displaystyle {\displaystyle \mathbb {Z} /10\mathbb {Z} }}" loading="lazy"></span>. Lookup tables are required for easy calculation. A similar code is the <a href="Damm_algorithm" title="Damm algorithm">Damm algorithm</a>, which has similar qualities.
</p>
<div class="mw-heading mw-heading2"><h2 id="Table-based_algorithm">Table-based algorithm</h2></div>
<p>The Verhoeff algorithm can be implemented using three tables:
a multiplication table <i>d</i>, an inverse table <i>inv</i>, and a permutation table <i>p</i>.
</p>
<style data-mw-deduplicate="TemplateStyles:r1216972533">
/* start https://en.wikipedia.org/ */
.mw-parser-output .col-begin{border-collapse:collapse;padding:0;color:inherit;width:100%;border:0;margin:0}.mw-parser-output .col-begin-small{font-size:90%}.mw-parser-output .col-break{vertical-align:top;text-align:left}.mw-parser-output .col-break-2{width:50%}.mw-parser-output .col-break-3{width:33.3%}.mw-parser-output .col-break-4{width:25%}.mw-parser-output .col-break-5{width:20%}@media(max-width:720px){.mw-parser-output .col-begin,.mw-parser-output .col-begin>tbody,.mw-parser-output .col-begin>tbody>tr,.mw-parser-output .col-begin>tbody>tr>td{display:block!important;width:100%!important}.mw-parser-output .col-break{padding-left:0!important}}
/* end https://en.wikipedia.org/ */
</style><div>
<table class="col-begin" role="presentation">
<tbody><tr>
<td class="col-break">
<table class="wikitable" style="text-align:center">
<tbody><tr valign="middle">
<th rowspan="2" colspan="2" style="background:#ffc"><span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d(j,k)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
<mo stretchy="false">(</mo>
<mi>j</mi>
<mo>,</mo>
<mi>k</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d(j,k)}</annotation>
</semantics>
</math></span><img src="./46653441a3c18e973adc1b7ef19e8d6f5f51bd25.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.228ex; height:2.843ex;" alt="{\displaystyle d(j,k)}" loading="lazy"></span></span><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</th>
<th colspan="10"><i>k</i>
</th></tr>
<tr valign="middle">
<th style="background:#ffc; width:1em">0
</th>
<th style="background:#ffc; width:1em">1
</th>
<th style="background:#ffc; width:1em">2
</th>
<th style="background:#ffc; width:1em">3
</th>
<th style="background:#ffc; width:1em">4
</th>
<th style="background:#ffc; width:1em">5
</th>
<th style="background:#ffc; width:1em">6
</th>
<th style="background:#ffc; width:1em">7
</th>
<th style="background:#ffc; width:1em">8
</th>
<th style="background:#ffc; width:1em">9
</th></tr>
<tr valign="middle">
<th rowspan="10" style="width:1em"><i>j</i>
</th>
<th style="background:#ffc; width:1em">0
</th>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">1
</th>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>0</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>5
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">2
</th>
<td>2</td>
<td>3</td>
<td>4</td>
<td>0</td>
<td>1</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>5</td>
<td>6
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">3
</th>
<td>3</td>
<td>4</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>8</td>
<td>9</td>
<td>5</td>
<td>6</td>
<td>7
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">4
</th>
<td>4</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>9</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">5
</th>
<td>5</td>
<td>9</td>
<td>8</td>
<td>7</td>
<td>6</td>
<td>0</td>
<td>4</td>
<td>3</td>
<td>2</td>
<td>1
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">6
</th>
<td>6</td>
<td>5</td>
<td>9</td>
<td>8</td>
<td>7</td>
<td>1</td>
<td>0</td>
<td>4</td>
<td>3</td>
<td>2
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">7
</th>
<td>7</td>
<td>6</td>
<td>5</td>
<td>9</td>
<td>8</td>
<td>2</td>
<td>1</td>
<td>0</td>
<td>4</td>
<td>3
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">8
</th>
<td>8</td>
<td>7</td>
<td>6</td>
<td>5</td>
<td>9</td>
<td>3</td>
<td>2</td>
<td>1</td>
<td>0</td>
<td>4
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">9
</th>
<td>9</td>
<td>8</td>
<td>7</td>
<td>6</td>
<td>5</td>
<td>4</td>
<td>3</td>
<td>2</td>
<td>1</td>
<td>0
</td></tr></tbody></table>
</td>
<td class="col-break" style="padding-left: 1em;">
<table class="wikitable" style="text-align:center">
<tbody><tr valign="middle">
<th style="background:#ffc; width:1em; height:3.5em;"><i>j</i>
</th>
<th style="width:1em; height:3.5em;"><span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle inv(j)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mi>n</mi>
<mi>v</mi>
<mo stretchy="false">(</mo>
<mi>j</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle inv(j)}</annotation>
</semantics>
</math></span><img src="./986e4f7cfd72821fbb5bf45e656260e1555539be.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.092ex; height:2.843ex;" alt="{\displaystyle inv(j)}" loading="lazy"></span></span>
</th></tr>
<tr>
<th style="background:#ffc; width:1em">0
</th>
<td>0
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">1
</th>
<td>4
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">2
</th>
<td>3
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">3
</th>
<td>2
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">4
</th>
<td>1
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">5
</th>
<td>5
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">6
</th>
<td>6
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">7
</th>
<td>7
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">8
</th>
<td>8
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">9
</th>
<td>9
</td></tr></tbody></table>
</td>
<td class="col-break" style="padding-left: 1em;">
<table class="wikitable" style="text-align:center">
<tbody><tr valign="middle">
<th rowspan="2" colspan="2" style="background:#ffc"><span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(pos,num)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mi>o</mi>
<mi>s</mi>
<mo>,</mo>
<mi>n</mi>
<mi>u</mi>
<mi>m</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p(pos,num)}</annotation>
</semantics>
</math></span><img src="./2b11f255111d76843130cc9d5c46126563b69afe.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:12.254ex; height:2.843ex;" alt="{\displaystyle p(pos,num)}" loading="lazy"></span></span>
</th>
<th colspan="10"><i>num</i>
</th></tr>
<tr valign="middle">
<th style="background:#ffc; width:1em">0
</th>
<th style="background:#ffc; width:1em">1
</th>
<th style="background:#ffc; width:1em">2
</th>
<th style="background:#ffc; width:1em">3
</th>
<th style="background:#ffc; width:1em">4
</th>
<th style="background:#ffc; width:1em">5
</th>
<th style="background:#ffc; width:1em">6
</th>
<th style="background:#ffc; width:1em">7
</th>
<th style="background:#ffc; width:1em">8
</th>
<th style="background:#ffc; width:1em">9
</th></tr>
<tr valign="middle">
<th rowspan="8" class="nowrap ts-vertical-header is-valign-middle" style=""><div style=""><style data-mw-deduplicate="TemplateStyles:r1221560606">
/* start https://en.wikipedia.org/ */
@supports(writing-mode:vertical-rl){.mw-parser-output .ts-vertical-header{line-height:1;max-width:1em;padding:0.4em;vertical-align:bottom;width:1em}html.client-js .mw-parser-output .sortable:not(.jquery-tablesorter) .ts-vertical-header:not(.unsortable),html.client-js .mw-parser-output .ts-vertical-header.headerSort{background-position:50%.4em;padding-right:0.4em;padding-top:21px}.mw-parser-output .ts-vertical-header.is-valign-top{vertical-align:top}.mw-parser-output .ts-vertical-header.is-valign-middle{vertical-align:middle}.mw-parser-output .ts-vertical-header.is-normal{font-weight:normal}.mw-parser-output .ts-vertical-header>*{display:inline-block;transform:rotate(180deg);writing-mode:vertical-rl}@supports(writing-mode:sideways-lr){.mw-parser-output .ts-vertical-header>*{transform:none;writing-mode:sideways-lr}}}
/* end https://en.wikipedia.org/ */
</style><span class="texhtml"> <i>pos</i> (mod 8)</span></div>
</th>
<th style="background:#ffc; width:1em">0
</th>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">1
</th>
<td>1</td>
<td>5</td>
<td>7</td>
<td>6</td>
<td>2</td>
<td>8</td>
<td>3</td>
<td>0</td>
<td>9</td>
<td>4
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">2
</th>
<td>5</td>
<td>8</td>
<td>0</td>
<td>3</td>
<td>7</td>
<td>9</td>
<td>6</td>
<td>1</td>
<td>4</td>
<td>2
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">3
</th>
<td>8</td>
<td>9</td>
<td>1</td>
<td>6</td>
<td>0</td>
<td>4</td>
<td>3</td>
<td>5</td>
<td>2</td>
<td>7
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">4
</th>
<td>9</td>
<td>4</td>
<td>5</td>
<td>3</td>
<td>1</td>
<td>2</td>
<td>6</td>
<td>8</td>
<td>7</td>
<td>0
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">5
</th>
<td>4</td>
<td>2</td>
<td>8</td>
<td>6</td>
<td>5</td>
<td>7</td>
<td>3</td>
<td>9</td>
<td>0</td>
<td>1
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">6
</th>
<td>2</td>
<td>7</td>
<td>9</td>
<td>3</td>
<td>8</td>
<td>0</td>
<td>6</td>
<td>4</td>
<td>1</td>
<td>5
</td></tr>
<tr valign="bottom">
<th style="background:#ffc">7
</th>
<td>7</td>
<td>0</td>
<td>4</td>
<td>6</td>
<td>9</td>
<td>1</td>
<td>3</td>
<td>2</td>
<td>5</td>
<td>8
</td></tr></tbody></table>
<p>
</p>
</td></tr></tbody></table></div>
<p>The first table, <i><b>d</b></i>, is based on multiplication in the dihedral group D<sub>5</sub>.<sup id="cite_ref-Gallian_2010_7-1" class="reference"><a href="#cite_note-Gallian_2010-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> and is simply the <a href="Cayley_table" title="Cayley table">Cayley table</a> of the group. Note that this group is not <a href="Commutative" class="mw-redirect" title="Commutative">commutative</a>, that is, for some values of <i>j</i> and <i>k</i>, <i>d</i>(<i>j</i>,<i>k</i>) ≠ <i>d</i>(<i>k</i>, <i>j</i>).
</p><p>The inverse table <i><b>inv</b></i> represents the <a href="Multiplicative_inverse" title="Multiplicative inverse">multiplicative inverse</a> of a digit, that is, the value that satisfies <i>d</i>(<i>j</i>, <i>inv</i>(<i>j</i>)) = 0.
</p><p>The permutation table <i><b>p</b></i> applies a <a href="Permutation" title="Permutation">permutation</a> to each digit based on its position in the number. This is actually a single permutation <span class="nowrap">(1 5 8 9 4 2 7 0)(3 6)</span> applied iteratively; i.e. <i>p</i>(<i>i</i>+<i>j</i>,<i>n</i>) = <i>p</i>(<i>i</i>, <i>p</i>(<i>j</i>,<i>n</i>)).
</p><p>The Verhoeff checksum calculation is performed as follows:
</p>
<ol><li>Create an array <i>n</i> out of the individual digits of the number, taken from right to left (rightmost digit is <i>n</i><sub>0</sub>, etc.).</li>
<li>Initialize the checksum <i>c</i> to zero.</li>
<li>For each index <i>i</i> of the array <i>n,</i> starting at zero, replace <i>c</i> with <span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d(c,p(i{\bmod {8}},n_{i}))}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo>,</mo>
<mi>p</mi>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>8</mn>
</mrow>
</mrow>
<mo>,</mo>
<msub>
<mi>n</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d(c,p(i{\bmod {8}},n_{i}))}</annotation>
</semantics>
</math></span><img src="./6a3216c028bd4fe9ac53381a62a64c13c60aa445.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.919ex; height:2.843ex;" alt="{\displaystyle d(c,p(i{\bmod {8}},n_{i}))}" loading="lazy"></span></span>.</li></ol>
<p>The original number is valid if and only if <span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c=0}</annotation>
</semantics>
</math></span><img src="./d9ee918699d0cb4b8c633cc1f520a8a7a174f44a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.268ex; height:2.176ex;" alt="{\displaystyle c=0}" loading="lazy"></span></span>.
</p><p>To generate a check digit, append a <span class="nowrap">0</span>, perform the calculation: the correct check digit is <span class="nowrap"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle inv(c)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mi>n</mi>
<mi>v</mi>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle inv(c)}</annotation>
</semantics>
</math></span><img src="./1a6c59c4c208767cea38f90de654b1bbfeb7b5d7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.141ex; height:2.843ex;" alt="{\displaystyle inv(c)}" loading="lazy"></span></span>..
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<div>
<table class="col-begin" role="presentation">
<tbody><tr>
<td class="col-break col-break-2">
<p><b>Generate</b> a check digit for <i>236</i>:
</p>
<table class="wikitable" style="text-align:center">
<tbody><tr>
<th style="background:#ffc"><i>i</i>
</th>
<th style="background:#ffc"><i>n<sub>i</sub></i>
</th>
<th style="background:#ffc"><i>p</i>(<i>i,n<sub>i</sub></i>)
</th>
<th style="background:#ffc"><i>c</i>
</th></tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0
</td></tr>
<tr>
<td>1</td>
<td>6</td>
<td>3</td>
<td>3
</td></tr>
<tr>
<td>2</td>
<td>3</td>
<td>3</td>
<td>1
</td></tr>
<tr>
<td>3</td>
<td>2</td>
<td>1</td>
<td>2
</td></tr></tbody></table>
<p><i>c</i> is 2, so the check digit is <i>inv</i>(2), which is 3.
</p>
</td>
<td class="col-break col-break-2">
<p><b>Validate</b> the check digit <i>2363</i>:
</p>
<table class="wikitable" style="text-align:center">
<tbody><tr>
<th style="background:#ffc"><i>i</i>
</th>
<th style="background:#ffc"><i>n<sub>i</sub></i>
</th>
<th style="background:#ffc"><i>p</i>(<i>i,n<sub>i</sub></i>)
</th>
<th style="background:#ffc"><i>c</i>
</th></tr>
<tr>
<td>0</td>
<td>3</td>
<td>3</td>
<td>3
</td></tr>
<tr>
<td>1</td>
<td>6</td>
<td>3</td>
<td>1
</td></tr>
<tr>
<td>2</td>
<td>3</td>
<td>3</td>
<td>4
</td></tr>
<tr>
<td>3</td>
<td>2</td>
<td>1</td>
<td>0
</td></tr></tbody></table>
<p><i>c</i> is zero, so the check is correct.
</p>
</td></tr></tbody></table></div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Luhn_algorithm" title="Luhn algorithm">Luhn algorithm</a>, earlier (1960) check digit algorithm</li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-Verhoeff_1969-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-Verhoeff_1969_1-0">^</a></b></span> <span class="reference-text">
<style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFVerhoeff1969" class="citation journal cs1">Verhoeff, J. (1969). "Error Detecting Decimal Codes (Tract 29)". <i>Zeitschrift für Angewandte Mathematik und Mechanik</i>. <b>51</b> (3). The Mathematical Centre, Amsterdam: 240. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1971ZaMM...51..240N">1971ZaMM...51..240N</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2Fzamm.19710510323">10.1002/zamm.19710510323</a>.</cite></span>
</li>
<li id="cite_note-Kirtland_2001-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-Kirtland_2001_2-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKirtland2001" class="citation book cs1"><a href="Joseph_Kirtland" title="Joseph Kirtland">Kirtland, Joseph</a> (2001). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=npTxORxmLosC&pg=PA121">"5. Group Theory and the Verhoeff Check Digit Scheme"</a>. <i>Identification Numbers and Check Digit Schemes</i>. Mathematical Association of America. p. 153. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-88385-720-0</bdi>.</cite></span>
</li>
<li id="cite_note-Salomon_2005-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-Salomon_2005_3-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSalomon2005" class="citation book cs1">Salomon, David (2005). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=A88kvYwIVu0C&pg=PA57">"§2.11 The Verhoeff Check Digit Method"</a>. <i>Coding for Data and Computer Communications</i>. Springer. pp. <span class="nowrap">56–</span>58. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-387-21245-0</bdi>.</cite></span>
</li>
<li id="cite_note-Haunsperger_2006-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-Haunsperger_2006_4-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHaunspergerKennedy2006" class="citation book cs1">Haunsperger, Deanna; Kennedy, Stephen, eds. (2006). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=jiaIeCUpoFwC&pg=PA39"><i>The Edge of the Universe: Celebrating Ten Years of Math Horizons</i></a>. Mathematical Association of America. p. 38. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-88385-555-3</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a> <a rel="nofollow" class="external text" href="https://lccn.loc.gov/2005937266">2005937266</a>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFGumm1985" class="citation journal cs1">Gumm, H. (January 1985). <a rel="nofollow" class="external text" href="https://www.researchgate.net/publication/3084126">"A new class of check-digit methods for arbitrary number systems (Corresp.)"</a>. <i>IEEE Transactions on Information Theory</i>. <b>31</b> (1): <span class="nowrap">102–</span>105. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTIT.1985.1056991">10.1109/TIT.1985.1056991</a>.</cite></span>
</li>
<li id="cite_note-Sisson_1958-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-Sisson_1958_6-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSisson1958" class="citation journal cs1">Sisson, Roger L. (May 1958). <a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F368819.368854">"An improved decimal redundancy check"</a>. <i>Communications of the ACM</i>. <b>1</b> (5): <span class="nowrap">10–</span>12. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F368819.368854">10.1145/368819.368854</a></span>.</cite></span>
</li>
<li id="cite_note-Gallian_2010-7"><span class="mw-cite-backlink">^ <a href="#cite_ref-Gallian_2010_7-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Gallian_2010_7-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGallian2010" class="citation book cs1">Gallian, Joseph A. (2010). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/contemporaryabst00gall_1"><i>Contemporary Abstract Algebra</i></a></span> (7th ed.). Brooks/Cole. p. <a rel="nofollow" class="external text" href="https://archive.org/details/contemporaryabst00gall_1/page/111">111</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-547-16509-7</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a> <a rel="nofollow" class="external text" href="https://lccn.loc.gov/2008940386">2008940386</a><span class="reference-accessdate">. Retrieved <span class="nowrap">August 26,</span> 2011</span>. <q>verhoeff check digit.</q></cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><a href="#CITEREFVerhoeff1969">Verhoeff 1969</a>, p. 95</span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><a href="#CITEREFVerhoeff1969">Verhoeff 1969</a>, p. 83</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */
.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */
@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}
/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Verhoeff_Algorithm" class="extiw external" title="wikibooks:Algorithm Implementation/Checksums/Verhoeff Algorithm">Algorithm_Implementation/Checksums/Verhoeff_Algorithm</a></b></i></div></div>
</div>
<ul><li><a rel="nofollow" class="external text" href="http://www.cs.utsa.edu/~wagner/laws/verhoeff.html">Detailed description of the Verhoeff algorithm</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-06-11" href="https://en.wikipedia.org/wiki/?title=Verhoeff_algorithm&oldid=1295028151">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>